1. Field of the Invention
This invention relates generally to programming code structure, and more particularly to method for keeping consistent the use of constants and properties among different code pieces of different source code types, all of which define a single program.
2. Description of the Related Art
Today, embedded mobile devices are being increasingly used by consumers all around the world which has lead to an ever-increasing demand for additional services. To provide such services, embedded mobile device manufacturers have been working with software development firms to code new programs and functionality. However, when firms other than those that make the mobile device program code, the program code type may be different than the code initially defined for the mobile device. Commonly, code that was developed by the mobile phone manufacturer is considered “native code.” This native code is usually written in a language such as C or C++. Later, outside firms may write code for the same mobile phone in an anther language, such as Java™.
Platforms and glue code have been developed to handle situations where code of different programming language types is used to make up a single larger program. One problem however, is the management of constants and properties. Many times, a constant defined by one code portion may also be defined by another different type code portion of the same program. Although this is common, errors will occur when the same constant is defined two or more code portions, and the value set in each code portion is different.
One way to solve this problem is to define the constants in one language (e.g., C) and have exposed interfaces to return the values from the other language. This is done so to keep the constant values defined in one location for easy update and maintainability. However this incurs high overheads, during runtime, because some optimizations cannot be done due to “unknown” constant values in the other language (e.g., Java).
Unfortunately, as additional functionality and integrate continues to be worked into multi-type applications, the need to synchronize constant values and properties among program portions will increase. As a result of this integration, more debug time will be wasted detecting problems generated due to wrong use of constant values. In many ways, debugging is sometimes made more complicated because a software tester may not detect the wrong use of a value until many hours are wasted reading and reading the code. Complexity in detecting a bug due to wrong use of a value can in many ways be one of the hardest errors to detect, since for all intensive purposes the code does not appear to have detectable mistakes.
In view of the foregoing, a need therefore exists in the art for a method and system to enable management of constant and property values for programs defined by different programming language type parts, which may share the same value name or property.